#	$Id: Makefile.in,v 1.8 2012/08/31 18:34:35 plunky Exp $
#
# Makefile.in for the cc driver part of pcc.
#
VPATH=@srcdir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
top_builddir=@top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
libexecdir = @libexecdir@
includedir = @includedir@
datarootdir = @datarootdir@
mandir = @mandir@
CC = @CC@
EXEEXT = @EXEEXT@
TARGOS = @targos@
TARGOSVER = @targosver@
TARGMACH = @targmach@
TARGET = @target@
VERSION = @PACKAGE_VERSION@
PCCLIBDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/lib
PCCINCDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/include
CFLAGS = @CFLAGS@ @ADD_CFLAGS@
CPPFLAGS = @CPPFLAGS@ -DLIBEXECDIR=\"$(libexecdir)/\" \
	@ADD_CPPFLAGS@ -DINCLUDEDIR=\"$(includedir)/\" \
	-DPCCINCDIR=\"$(PCCINCDIR)/\" -DPCCLIBDIR=\"$(PCCLIBDIR)/\" \
	-DTARGOS=\"$(TARGOS)\" -DTARGOSVER=$(TARGOSVER) -Dos_$(TARGOS) \
	-DTARGMACH=\"$(TARGMACH)\" -Dmach_$(TARGMACH) \
	-I$(top_builddir) -I$(top_srcdir)/os/$(TARGOS) -I$(MIPDIR) -I$(MDIR)
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

OBJS=driver.o platform.o strlist.o xalloc.o
DEST=@BINPREFIX@pcc$(EXEEXT)

MIPDIR=$(top_srcdir)/mip
MDIR=$(top_srcdir)/arch/$(TARGMACH)

all: $(DEST)

$(DEST): $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

install:
	test -z "$(DESTDIR)$(bindir)" || mkdir -p "$(DESTDIR)$(bindir)"
	$(INSTALL_PROGRAM) $(DEST) $(DESTDIR)$(bindir)

clean:
	rm -f  $(OBJS) $(DEST)

distclean: clean
	rm -f  Makefile
